@extends('layout.admin')

@section('content')
	
	<div class="clearfix"></div>
  <div class="col-md-12 " >
  @if (count($errors) > 0)
      <div class="alert alert-info">
              @foreach ($errors->all() as $error)
              <li>
                <img src="/admins/images/info.png" alt="">&nbsp;
                {{ $error }}</li>
              @endforeach
      </div>
  @endif
	<div >
  @if(count($errors)>0)
      <div class="alert alert-info">
                @foreach($errors->all() as $error) 
                <li>
                <img src="/admins/images/info.png" alt="">&nbsp;
                {{$error}}</li>
                @endforeach
      </div>
 @endif


 <div class="panel-head"><strong class="icon-reorder"> 内容列表</strong></div>
  <table class="table table-hover text-center">
    <tbody>
    <tr>
      <th width="5%">ID</th>
      <th width="15%">分类名称</th>
      <th width="10%">父级分类</th>
      <th width="10%">操作</th>
    </tr>
    @foreach($cates as $k=>$v)
    <tr>
      <td>{{$v->id}}</td>
      <td style="text-align:left;padding-left:190px">{{$v->name}}</td>

      <td >{{getCateName($v->pid)}}</td>
      <td><div> <a class="button border-main" href="/admin/cate/edit?id={{$v->id}}"><span class="icon-edit"></span> 修改</a> <a class="button border-red" href="/admin/cate/delete?id={{$v->id}}" onclick="return del(1,2)"><span class="icon-trash-o"></span> 删除</a> </div></td>
    </tr>
    @endforeach

  </tbody></table>
</div>
</div>


@endsection